#!/bin/sh
# Replace password in application.yml files
if [ -f "src/main/resources/application.yml" ]; then
    sed -i.bak 's/password: amazingtianchen5/password: ${DB_PASSWORD:your_password_here}/g' src/main/resources/application.yml 2>/dev/null || sed -i '' 's/password: amazingtianchen5/password: ${DB_PASSWORD:your_password_here}/g' src/main/resources/application.yml 2>/dev/null
    rm -f src/main/resources/application.yml.bak 2>/dev/null
fi
if [ -f "backend/drug-bid/src/main/resources/application.yml" ]; then
    sed -i.bak 's/password: amazingtianchen5/password: ${DB_PASSWORD:your_password_here}/g' backend/drug-bid/src/main/resources/application.yml 2>/dev/null || sed -i '' 's/password: amazingtianchen5/password: ${DB_PASSWORD:your_password_here}/g' backend/drug-bid/src/main/resources/application.yml 2>/dev/null
    rm -f backend/drug-bid/src/main/resources/application.yml.bak 2>/dev/null
fi
git add -A

